package com.ctshk.rpc.custom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.custom.entity.CustomizedTripScheduleCollectionFee;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 团期代收费用 Mapper 接口
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-21
 */
public interface CustomizedTripScheduleCollectionFeeMapper extends BaseMapper<CustomizedTripScheduleCollectionFee> {

    /**
     * 清除旧数据
     * @param scheduleId
     */
    @Update("UPDATE t_customized_trip_schedule_collection_fee\n" +
            "SET is_deleted = 1,modified_id = #{user_id}\n" +
            "WHERE schedule_id = #{schedule_id} AND is_deleted = 0")
    Integer cleanBySchedule(@Param("schedule_id") Long scheduleId,@Param("user_id")Long userId);
}
